package com.kantboot.api.google.translate;

import com.kantboot.api.google.translate.service.IGoogleTranslateService;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class ITestGoogleTranslateService {

    @Resource
    private IGoogleTranslateService service;

    @Test
    public void testTranslateText() {
        System.setProperty("https.proxyHost", "127.0.0.1");
        System.setProperty("https.proxyPort", "7890");

        String sourceLanguageCode = "en";
        String targetLanguage = "zh-CN";
        String text = "Hello";
        String result = service.translateText(sourceLanguageCode, targetLanguage, text);
        System.out.println(result);
    }

}
